﻿#ifndef MYOPENGLWIDGET_H
#define MYOPENGLWIDGET_H

#include <QOpenGLFunctions_3_3_Core>
#include <QOpenGLWidget>

class MyOpenGLWidget : public QOpenGLWidget, QOpenGLFunctions_3_3_Core {
    Q_OBJECT
  public:
    enum Shape { None, Rect, Circle, Triangle };

    MyOpenGLWidget( QWidget *parent = nullptr );
    ~MyOpenGLWidget();

    void drawShape( Shape shape );
    void setWireframe( bool wireframe );

  protected:
    virtual void initializeGL();
    virtual void resizeGL( int w, int h );
    virtual void paintGL();

  signals:

  public slots:

  private:
    Shape m_shape;
};

#endif // MYOPENGLWIDGET_H
